import * as files from './**/*.js'; // Assuming you have necessary configuration for dynamic import in TypeScript

let api: Record<string, any> = {}; // Define type for api object

Object.keys(files).forEach((key) => {
  api = {
    ...api,
    [key.replace(/(.*\/)*([^.]+).*/gi, '$2')]: (files as Record<string, any>)[key].default,
  };
});

export default api;
